extends Node2D


onready var Enemy = load("res://obj/Enemy.tscn")

func _ready():
	randomize()
	pass
	
func gen_emeny():
	var x = 1200
	var y = rand_range(0,700)
	var enemy = Enemy.instance()
	enemy.position.x = x
	enemy.position.y = y
	add_child(enemy)

func _on_Timer_timeout():
	gen_emeny()
	pass


func _on_back_pressed():
	get_tree().change_scene("res://scene/Main.tscn")
	pass # Replace with function body.
